package com.iknow.db;

import android.database.Cursor;
import android.provider.BaseColumns;
import com.iknow.data.RosterItem;

public class XmppRosterTable
  implements BaseColumns
{
  public static final String CREATE_TABLE = "create table xmpp_roster (jid text primary key on conflict replace, name text, subscribe_mode integer, presence integer)";
  public static final String JID = "jid";
  public static final String NAME = "name";
  public static final String PRESENCE = "presence";
  public static final String SUBSCRIBLE_MODE = "subscribe_mode";
  public static final String[] TABLE_COLUMNS;
  public static final String TABLE_NAME = "xmpp_roster";
  public static final String TAG = "XmppRosterTable";

  static
  {
    String[] arrayOfString = new String[3];
    arrayOfString[0] = "jid";
    arrayOfString[1] = "subscribe_mode";
    arrayOfString[2] = "name";
    TABLE_COLUMNS = arrayOfString;
  }

  public static RosterItem parseCursor(Cursor paramCursor)
  {
    return new RosterItem(paramCursor.getString(paramCursor.getColumnIndex("jid")), paramCursor.getString(paramCursor.getColumnIndex("name")), paramCursor.getInt(paramCursor.getColumnIndex("subscribe_mode")));
  }
}